![]() |
BiVo EFM32GG12
0.1
An open source foundation foundation for remote monitoring of bird vocalizations.
|
Communication Driver. More...
#include "gen_com.h"Functions | |
| void | genCom_init (void) |
| void | handshakeApp (void) |
| Handshake with the desktop application. Blocks until handshake operation is complete. Three-step process: get message from computer, echo that message back, and then receive an acknowledge message from the computer again. More... | |
| void | waitOnRecordMessage (void) |
| Block until record message is received. Blocks until the record command is received from the desktop application. | |
| int | stringCompare (char *str1, char *str2, int len) |
Variables | |
| char | handshake_request [5] = "hands" |
| char | handshake_response [5] = "cnfrm" |
| char | handshake_ack [5] = "ackng" |
| char | record_command [5] = "recrd" |
Communication Driver.
This general communication driver implements the communication schema and is designed to be abstracted from the medium-specific communication needs so changing from USB to something else requires minimal modification to this driver.
| void genCom_init | ( | void | ) |
Initialize the general communication module. At this point, only makes sure the serial communication module is initialized.
| void handshakeApp | ( | void | ) |
Handshake with the desktop application. Blocks until handshake operation is complete. Three-step process: get message from computer, echo that message back, and then receive an acknowledge message from the computer again.
Function Prototypes
| int stringCompare | ( | char * | str1, |
| char * | str2, | ||
| int | len | ||
| ) |
Compares two strings to each other up to a specified length. Identicial to strcmp but terminates on length instead of null character.
| str1 | First string to compare |
| str2 | Second string to compare to the first string. |
| len | The number of characters to compare |
| char handshake_request[5] = "hands" |
Message Strings